import request from '@/utils/request'
import requests from '@/utils/https'

export function login(data) {
  return request({
    url: 'api/loginAdmin',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout(data) {
  return request({
    url: 'api/loginOutAdmin',
    method: 'post',
    data
  })
}

export function getMenus(params) {
  return request({
    url: 'api/queryAuth',
    method: 'get',
    params
  })
}

//用户注册
export const userRegister = params => requests('post','api/userRegister',params)

//修改密码
export const updatePassword = params => requests('post','api/updatePassword',params)
